﻿using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

public class BundleEditor 
{
    public static string ABCONFIGPATH = "Assets/Editor/ABConfig.asset";
    [MenuItem("Tools/打包")]
    public static void Build()
    {
        //读取ABConfig文件
        ABConfig abConfig = AssetDatabase.LoadAssetAtPath<ABConfig>(ABCONFIGPATH);
        
        foreach (string str in abConfig.m_AllPrefabPath)
        {
            //输出Prefab的文件夹路径
            Debug.Log(str);
        }

        foreach (ABConfig.FileDirABName fileDir in abConfig.m_AllFileDirAB)
        {
            //输出文件夹AB包名字
            Debug.Log(fileDir.ABName);
            //输出这个文件夹的路径
            Debug.Log(fileDir.Path);
        }
    }
}
